import React, {useState} from 'react';
import {Tooltip} from "antd";
import '../../index.less';
import styles from "@/pages/customer/information/components/Profile/index.less";
export interface FavouriteIconProps {
  [propName: string]: any;
}
const FavouriteIcon: React.FC<FavouriteIconProps> = () => {
  // const isFavorite = true;
  const [isFavorite = true, setIsFavorite] = useState();
  return (
    <div className={styles.cardIcon}>
      <Tooltip
        title={isFavorite ? 'Add To Favourite' : 'Remove From Favourite'}
        placement="topLeft"
        overlayStyle={{fontSize: '12px'}}
      >
        <i
          className={`iconfont ${isFavorite ? 'rws-collect' : 'rws-star'}`}
          style={{cursor: 'pointer',color:'#ffce0d'}}
          onClick={() => setIsFavorite(!isFavorite)}
        />
      </Tooltip>
    </div>
  );
};

export default FavouriteIcon;
